<script setup>
const emit = defineEmits(['update:modelValue'])
const handlerClose = ()=>{
  emit('update:modelValue',false)
}
</script>
<template>
  <el-dialog
      :model-value="centerDialogVisible"
      title="Warning"
      width="500"
      @close="handlerClose()"
  >
    <span>Open the dialog from the center from the screen</span>
    <template #footer>
      <div class="dialog-footer">
        <el-button class="cancel-btn" @click="handlerClose()">Cancel</el-button>
        <el-button class="confirm-btn" type="primary" @click="handlerClose()">
          Confirm
        </el-button>
      </div>
    </template>
  </el-dialog>
</template>
<style scoped lang="scss">
.el-dialog {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  .dialog-footer {
    display: flex;
    justify-content: space-between;
    width: 100%;

    .cancel-btn, .confirm-btn {
      flex: 1;
      margin: 0 5px;
    }
  }
}

// 如果你仍然需要ipt_box样式
.ipt_box {
  display: flex;
  justify-content: space-between;

  .el-form-item {
    width: 48%;

    .el-radio.el-radio--large {
      height: auto;
    }
  }
}
</style>
